package website.lhc.chapter1;

import lombok.extern.slf4j.Slf4j;

/**
 * 返利
 *
 * @author: longhc@citycloud.com.cn
 * @since: 2022/12/8 9:49
 * @version: 1.0
 */
@Slf4j
public class CashReturn implements CashSuper {

    private final double moneyCondition;
    private final Integer moneyReturn;

    public CashReturn(double moneyCondition, Integer moneyReturn) {
        this.moneyCondition = moneyCondition;
        this.moneyReturn = moneyReturn;
    }

    @Override
    public double acceptCash(double money) {
        return this.moneyCondition * money;
    }
}
